package com.videoweb.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.List;

import com.videoweb.constant.Constants;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;



/**
 * <p>
 * 
 * </p>
 *
 * @author lmr
 * @since 2025-05-17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("user")
public class User implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private String username;

    private String password;

    private String nickname;

    private String phone;

    private String avatar;

    private Integer gender;

    private String bio;

    private Integer status;

    private LocalDateTime createdAt;

    private LocalDateTime updatedAt;


    /** 帐号状态（1正常 0停用） */


    @TableField(exist = false)
    private List<Role> roles;

    @TableField(exist = false)
    private Long roleId;

    public void setAvatar(String avatar) {
        this.avatar =  avatar;
    }


}
